 /**
 * Description: 物资借出记录
 * @author:Hunter
 * @since:1.0.0
 *
 * Modification History:
 * Date         Author      Version     Description
 * ------------------------------------------------------------------
 * 2018-04-08   Hunter       1.0.0     Initial
 */
package com.metro.paperless.app.service.inf;

import java.util.List;

import com.metro.core.service.IService;
import com.metro.core.vo.JsonResult;
import com.metro.core.vo.inf.IResult;
import com.metro.paperless.app.beans.vo.AppLendDetail;
import com.metro.paperless.app.beans.vo.AppLendDetailForm;
import com.metro.paperless.app.beans.vo.AppMaterialsLend;

 /**
 * 物资借出记录<br>
 *
 * @author:Hunter
 * @since:1.0.0
 * @version [1.0.0, 2018-04-08]
 */
public interface IAppMaterialsLendService extends IService<AppMaterialsLend>{
	
	/**
	 * 保存借出和借出明细记录
	 * @param form
	 * @param materialsLend
	 * @return
	 */
	IResult save(AppLendDetailForm form ,AppMaterialsLend materialsLend);
	
	
	/**
	 * 保存时修改可用库存，签署完成后更新数据时修改实际库存
	 * @param form
	 * @param materialsLend
	 * @return
	 */
	JsonResult saveOther(AppLendDetailForm form ,AppMaterialsLend materialsLend);
	
	/**
	 * 修改借出和借出明细记录
	 * @param form
	 * @param materialsLend
	 * @return
	 */
	IResult update(AppLendDetailForm form ,AppMaterialsLend materialsLend);
	
	/**
	 * 物资出借之后修改出借记录的状态和出借物资详情的状态以及物资的库存
	 * @return
	 */
	IResult updateMateAndLend(AppMaterialsLend materialsLend, List<AppLendDetail> appLendDetailList);
	
	/**
	 * 删除借出记录与明细
	 * @param lendId
	 * @return
	 */
	IResult deleteLendAndDetail(Long lendId);
}